package com.fileshare.web.service;

import com.fileshare.web.dto.Bo.AuthorityBo;
import com.fileshare.web.dto.Bo.RoleBo;
import com.fileshare.web.dto.Vo.AuthorityVo;
import com.fileshare.web.dto.Vo.RoleVo;
import com.fileshare.web.entity.Authority;
import com.fileshare.web.entity.Role;
import com.fileshare.web.entity.User;

import java.util.List;

public interface AuthService {

    void initThirdPartyUserAuth(User thirdPartyUser);

    List<String> getUserAuthStrings(User dbUser);

    RoleVo addRole(RoleBo roleBo);


    RoleVo removeRole(Integer id);

    RoleVo updateRole(RoleBo roleBo);

    List<Role> getAllRoles();

    List<RoleVo> getUserRoles(Integer userId);

    List<RoleVo> saveUserRoles(Integer userId, List<String> roles);

    List<Authority> getAllRoleAuthorities(Integer id);

    List<Authority> getAllAuthorities();

    List<Authority> saveRoleAuthorities(Integer id, List<String> roleAuthorities);

    AuthorityVo addAuthority(AuthorityBo authorityBo);

    AuthorityVo removeAuthority(Integer id);

    AuthorityVo updateAuthority(AuthorityBo authorityBo);
}
